package org.cuadroanotacionapi.controller;

import org.cuadroanotacionapi.beans.Jos_fastball_team;
import java.sql.Time;
import java.io.Serializable;
import java.util.List;
import java.util.ArrayList;
import java.util.*;
import java.util.HashMap;
import java.util.Map;
import org.cuadroanotacionapi.persistencia.Jos_fastball_teamPersistencia;
import org.cuadroanotacionapi.generales.Mensajeria;


/**
*
*  @author
*/

public class Jos_fastball_teamController implements Serializable {
private static final long serialVersionUID = 1L;
public static Exception excepcion;



private List<Jos_fastball_team> jos_fastball_teamlist;

private Jos_fastball_team selectedjos_fastball_team;



public Jos_fastball_teamController(){
}

public Jos_fastball_team getSelectedJos_fastball_team() {
 return selectedjos_fastball_team;
}

 public void setSelectedJos_fastball_team(Jos_fastball_team selectedjos_fastball_team) {
 this.selectedjos_fastball_team = selectedjos_fastball_team;
}


public List<Jos_fastball_team> getJos_fastball_teamlist() {
return jos_fastball_teamlist;
}

 public void setJos_fastball_teamlist(List<Jos_fastball_team> jos_fastball_teamlist) {
this.jos_fastball_teamlist = jos_fastball_teamlist;
}
/*
*  getMensaje()
*   devuelve el mensaje encontrado...
*/
public String getMensaje() {
   String lexcepcion = excepcion.toString();
   if (lexcepcion.indexOf(":") != -1) {
       lexcepcion = lexcepcion.substring(lexcepcion.indexOf(":") + 1);
   }
  return lexcepcion;
}


/**
*
* Crear()
*/

public boolean Crear (Jos_fastball_team jos_fastball_team) {
try{
   if (Validar(jos_fastball_team)) {
     if (findByPrimaryKey(jos_fastball_team)==null) {
         if (!Jos_fastball_teamPersistencia.Insertar(jos_fastball_team)) {
                 excepcion = Jos_fastball_teamPersistencia.excepcion;
          }
          else{
             return true;
           }
       }else{
             excepcion =new Exception("Ya existe un registro con esos datos");
            return false;
       }
    }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Crear()");
  }
  return false;
}


/**
*
* Editar()
*/

public boolean Editar (Jos_fastball_team jos_fastball_team) {
try{
   if (Validar(jos_fastball_team)) {
 if (Jos_fastball_teamPersistencia.ExisteRegistro(jos_fastball_team)) {
     if (!Jos_fastball_teamPersistencia.Editar(jos_fastball_team)) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
     }
     else{
            return true;
     }
   }else{
             excepcion =new Exception("No existe un registro con esa clave primaria");
            return false;
     }
  }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Editar()");
  }
  return false;
}


/**
*
* Editar(String sqlupdate)
*/

public boolean Editar(String sqlupdate) {
try{
     if (!Jos_fastball_teamPersistencia.Editar(sqlupdate)) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
     }
     else{
            return true;
     }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Editar()");
  }
  return false;
}


/**
*
* EditarClavePrimaria()
*/

public boolean EditarClavePrimaria (Jos_fastball_team jos_fastball_team_old , Jos_fastball_team jos_fastball_team) {
try{
   if (Validar(jos_fastball_team_old)) {
 if (Jos_fastball_teamPersistencia.ExisteRegistro(jos_fastball_team_old)) {
     if (!Jos_fastball_teamPersistencia.EditarClavePrimaria(jos_fastball_team_old,jos_fastball_team)) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
     }
     else{
            return true;
     }
   }else{
             excepcion =new Exception("No existe un registro con esa clave primaria");
            return false;
     }
  }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Editar()");
  }
  return false;
}


/**
*
* Eliminar()
*/

public boolean Eliminar (Jos_fastball_team jos_fastball_team) {
try{
 if (findByPrimaryKey(jos_fastball_team)!=null) {
     if (!Jos_fastball_teamPersistencia.Eliminar(jos_fastball_team)) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
     }else{
            return true;
           }
   }else{
             excepcion =new Exception("No existe un registro con esa clave primaria");
            return false;
     }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Eliminar()");
  }
  return false;
}


/**
*
* Eliminar(String sqldelete)
*/

public boolean Eliminar(String sqldelete) {
try{
     if (!Jos_fastball_teamPersistencia.Eliminar(sqldelete)) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
     }else{
            return true;
           }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Eliminar()");
  }
  return false;
}


/**
*
* EliminarTodos()
*/

public boolean EliminarTodos() {
try{
     if (!Jos_fastball_teamPersistencia.EliminarTodos()) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
     }
     else{
            return true;
     }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"EliminarTodos()");
  }
  return false;
}


/**
*
* ExisteRegistro()
*/



public boolean ExisteRegistro(Jos_fastball_team jos_fastball_team) {
try{
  return Jos_fastball_teamPersistencia.ExisteRegistro(jos_fastball_team);
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"ExisteRegistro()");
  }
 return false;
}


/**
*
* findPrimaryKey()
*/



public Jos_fastball_team findByPrimaryKey(Jos_fastball_team jos_fastball_team) {
try{
    this.selectedjos_fastball_team = Jos_fastball_teamPersistencia.findByPrimaryKey(jos_fastball_team);
    return selectedjos_fastball_team;
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPrimaryKey()");
  }
 return null;
}


/**
*
* findById()
*/

public boolean findById(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findById(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findById()");
  }
  return false;
  }


/**
*
* findByLeagueid()
*/

public boolean findByLeagueid(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByLeagueid(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByLeagueid()");
  }
  return false;
  }


/**
*
* findByDivisionid()
*/

public boolean findByDivisionid(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByDivisionid(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByDivisionid()");
  }
  return false;
  }


/**
*
* findByDefaultteam()
*/

public boolean findByDefaultteam(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByDefaultteam(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByDefaultteam()");
  }
  return false;
  }


/**
*
* findByName()
*/

public boolean findByName(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByName(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByName()");
  }
  return false;
  }


/**
*
* findByShortname()
*/

public boolean findByShortname(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByShortname(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByShortname()");
  }
  return false;
  }


/**
*
* findByCity()
*/

public boolean findByCity(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByCity(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByCity()");
  }
  return false;
  }


/**
*
* findByState()
*/

public boolean findByState(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByState(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByState()");
  }
  return false;
  }


/**
*
* findByAdminids()
*/

public boolean findByAdminids(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByAdminids(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByAdminids()");
  }
  return false;
  }


/**
*
* findByMname()
*/

public boolean findByMname(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByMname(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByMname()");
  }
  return false;
  }


/**
*
* findByMphone()
*/

public boolean findByMphone(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByMphone(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByMphone()");
  }
  return false;
  }


/**
*
* findByMmobile()
*/

public boolean findByMmobile(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByMmobile(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByMmobile()");
  }
  return false;
  }


/**
*
* findByMemail()
*/

public boolean findByMemail(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByMemail(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByMemail()");
  }
  return false;
  }


/**
*
* findByMshow()
*/

public boolean findByMshow(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByMshow(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByMshow()");
  }
  return false;
  }


/**
*
* findByM1name()
*/

public boolean findByM1name(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByM1name(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByM1name()");
  }
  return false;
  }


/**
*
* findByM1phone()
*/

public boolean findByM1phone(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByM1phone(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByM1phone()");
  }
  return false;
  }


/**
*
* findByM1mobile()
*/

public boolean findByM1mobile(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByM1mobile(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByM1mobile()");
  }
  return false;
  }


/**
*
* findByM1email()
*/

public boolean findByM1email(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByM1email(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByM1email()");
  }
  return false;
  }


/**
*
* findByM1show()
*/

public boolean findByM1show(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByM1show(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByM1show()");
  }
  return false;
  }


/**
*
* findByM2name()
*/

public boolean findByM2name(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByM2name(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByM2name()");
  }
  return false;
  }


/**
*
* findByM2phone()
*/

public boolean findByM2phone(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByM2phone(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByM2phone()");
  }
  return false;
  }


/**
*
* findByM2mobile()
*/

public boolean findByM2mobile(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByM2mobile(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByM2mobile()");
  }
  return false;
  }


/**
*
* findByM2email()
*/

public boolean findByM2email(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByM2email(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByM2email()");
  }
  return false;
  }


/**
*
* findByLogo()
*/

public boolean findByLogo(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByLogo(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByLogo()");
  }
  return false;
  }


/**
*
* findByPhoto()
*/

public boolean findByPhoto(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByPhoto(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPhoto()");
  }
  return false;
  }


/**
*
* findByAccomplishments()
*/

public boolean findByAccomplishments(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByAccomplishments(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByAccomplishments()");
  }
  return false;
  }


/**
*
* findByChecked_out()
*/

public boolean findByChecked_out(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByChecked_out(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByChecked_out()");
  }
  return false;
  }


/**
*
* findByChecked_out_time()
*/

public boolean findByChecked_out_time(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByChecked_out_time(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByChecked_out_time()");
  }
  return false;
  }


/**
*
* findByPublished()
*/

public boolean findByPublished(Jos_fastball_team jos_fastball_team) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByPublished(jos_fastball_team) ;
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPublished()");
  }
  return false;
  }


/**
*
* findByMapa()
*/

public boolean findByMapa(Map parametros) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.findByMapa(parametros);
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByMapa()");
  }
  return false;
}


/**
*
* Func(String funcion, String campo)
*/

public Double Func(String funcion, String campo) {
  try{
     return Jos_fastball_teamPersistencia.Func(funcion,campo);
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Func()");
  }
  return 0.0;
}


/**
*
* Double Func(String funcion, String campo, String where)
*/

public Double Func(String funcion, String campo,String where) {
  try{
     return Jos_fastball_teamPersistencia.Func(funcion,campo,where);
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Func()");
  }
  return 0.0;
}


/**
*
* Contador()
*/

public Integer Contador() {
  try{
     int x =Jos_fastball_teamPersistencia.Contador();
    return x;
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Contador()");
  }
 return 0;
}


/**
*
* Contador(String sql)
*/

public Integer Contador(String sqlquery) {
  try{
     int x =Jos_fastball_teamPersistencia.Contador(sqlquery);
    return x;
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Contador()");
  }
 return 0;
}


/**
*
* Query()
*/

public boolean Query(String query) {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.Query(query);
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Query()");
  }
  return false;
}


/**
*
* Listar()
*/



public boolean Listar() {
  try{
     if(jos_fastball_teamlist != null){
        jos_fastball_teamlist.removeAll(jos_fastball_teamlist);
     }
     Map<String, String> parametros = new HashMap<String, String>();
     jos_fastball_teamlist = Jos_fastball_teamPersistencia.getLista(parametros);
     if (jos_fastball_teamlist== null) {
                excepcion = Jos_fastball_teamPersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByMapa()");
  }
            return false;
}


public boolean Validar(Jos_fastball_team jos_fastball_team) {
 try{
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("org/cuadroanotacionapi/properties/mensajes");

if (jos_fastball_team.getId() == null || jos_fastball_team.getId().equals("")){
   excepcion=new Exception(bundle.getString("id")  + "  " + bundle.getString("msg.nonulo"));
  return false;
}
  return true;
 }catch(Exception ex){
   Mensajeria.MensajeError(ex, "Validar()");
  return false;

  }
}


}
